package emil.poker.players;

import emil.poker.Decision;
import emil.poker.players.SimpleConsolePlayer;

public class TestPlayer extends ConcretePlayer {

	Decision raiseOrCall( Decision[] list ){
		for (Decision decision : list) {
			if ( Decision.RAISE.equals( decision ) ) {
				return raise();
			}
			
			if ( Decision.BET.equals( decision ) ) {
				return bet();
			}
		}
		return call();
	}
	
	Decision callOrCheck(Decision[] list){
		for (Decision decision : list) {
			if ( Decision.CALL.equals( decision ) ) {
				return call();
			}
		}
		return check();
	}
	
	Decision foldOrCheck(Decision[] list){
		for (Decision decision : list) {
			if ( Decision.FOLD.equals( decision ) ) {
				return fold();
			}
		}
		return check();
	}
	
	public Decision makeDecision(Decision[] legalDecisions) {
		return legalDecisions[0];
	}

	public TestPlayer() {
		super();
	}

	public TestPlayer(String name) {
		super(name);
	}
}
